// LinkedList.cpp : Defines the entry point for the console application.


#include "stdio.h"
#include "stdlib.h"
#include "string.h"




int combine(char in[], char out[], int start, int length, int level)
{
	int i;
	

	for(i=start; i<length; i++){


		out[level] = in[i];
		out[level+1] = '\0';

		printf("%s\n", out);

		combine(in, out, i+1, length, level + 1);		
	}
	

	return 0;
}


int main(int argc, char* argv[])
{
	unsigned int l;
	char str[] = "WXYZ";
	
	l = strlen(str);

	char *out = (char*)malloc(sizeof(char) * (l+1));

	out[l] = '\0';

	
	combine(str, out, 0, l, 0);
		
	return 0;
}

